# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gst-libav
pkgver=1.20.3
pkgrel=0
pkgdesc="GStreamer streaming media framework libav plugin"
url="https://gstreamer.freedesktop.org"
arch="all"
license="GPL-2.0-or-later LGPL-2.0-or-later"
makedepends="coreutils ffmpeg-dev gst-plugins-base-dev gstreamer-dev meson
	orc-dev"
source="https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-$pkgver.tar.xz"
replaces="gst-libav1"

build() {
	abuild-meson \
		-Dpackage-origin="https://alpinelinux.org" \
		-Dpackage-name="GStreamer libav plugin (Alpine Linux)" \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test -v --no-rebuild -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

doc() {
	default_doc
	replaces="${pkgname}1-doc"
}

sha512sums="
0b57883f9b929d3aaddf1f7ca4d9160869e5b1efa49ea1a7e06d1d8c7b81de057f5de575abb4ef5d6b77668e5bb57e38a66c0c34917f6b99fdd310ac293453c9  gst-libav-1.20.3.tar.xz
"
